package personal.vivian.groovy

langs=['C++':'strongstup','Java':'Gosling']
content=''
langs.each{
    language,author->
        fragment=""" 
 <language name="${language}">
    <author>${author}</author>
 </language> """
        content+=fragment
}
xml="<languages>${content}</language>"
println(xml)